var IIndex = Vue.component('IIndex', {

    data() {
        return {
            data: {
                page: { // 分页
                    totalPage: 10, // 数据总页数
                    totalNum: 520, // 数据总条数
                    pageNum: 6 // 数据请求条数
                }
            }
        }
    },
    
    template: `<div class="inform__index__box"> 
                    <div class="inform__index__con">
                        <div class="inform__index__nav">
                            <span>资讯列表</span>
                            <button @click="goPublishFun">发布新资讯</button>
                        </div>
                        <div class="table__three inform__index__table">
                            <div class="table__three__list">
                                <table>
                                    <tbody>
                                        <tr>
                                            <th>
                                                <span>标题</span>
                                            </th>
                                            <th>
                                                <span>图片</span>
                                            </th>
                                            <th>
                                                <span>发布时间</span>
                                            </th>
                                        </tr>
                                        <tr>
                                            <td>
                                                <span>FJGIYYTRTFF</span>
                                            </td>
                                            <td>
                                                <img src="">
                                            </td>
                                            <td>
                                                <p>201-10-01</p>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <common-page :getPage="data.page" @givePageFun="givePageFun"></common-page>
                </div>`,
    methods: {
        goPublishFun: function () { // 跳转发布页
            let router_click = this.$router.resolve({
                name: 'IPublish',
            })
            window.open(router_click.href, '_blank')
        },
        givePageFun: function (res) { // 接收分页数据
            console.log(res)
        }
    },

    created() {
        
    },
})